{ Exemplo de programa-fonte da linguagem "GL" }

DPonto
	  P1=(-10,10,10)		
      P2=(-10,-10,10)
      P3=(10,-10,10)
      P4=(10,10,10)
      P5=(-10,10,-10)
      P6=(-10,-10,-10)
      P7=(10,-10,-10)
      P8=(10,10,-10)
DCor
      AZUL=15,20,20,40,30,30,60
DFace
      F1=AZUL,P1,P2,P3,P4
      F2=AZUL,P4,P3,P7,P8
      F3=AZUL,P8,P7,P6,P5
      F4=AZUL,P5,P6,P2,P1
      F5=AZUL,P5,P1,P4,P8	
      F6=AZUL,P7,P3,P2,P6
DLuz
      L1=(200,200,200)
DObjeto
      CUBO = F1,F2,F3,F4,F5,F6
DConst
      ESC = 1.5
      MAXTEMPO = 50
      G = 0.07
      D0X = -200
      D0Y = 200
      D0Z = 0
      V0X = 8	  
      V0Y = 2
      V0Z = 0
DVar
      inteiro i
	

	{teste}


	
Inicio

   Luz L1 
   Escala CUBO,ESC
   i=1

   Rottrans CUBO,0,0,0,D0X,D0Y,D0Z
   enquanto i<MAXTEMPO Faca
   inicio   
     Rottrans CUBO,0.1,0.1,0,V0X,V0Y-0.5*G*i*i,V0Z
     i=i+1
     pausa 0.05
   Fim
Fim